<?php
/***************************************************************************
                                  Final1.php
                               ----------------
  
        A PHP5 class used as a reference to test final class parsing. 

 **************************************************************************/

/**
 * A class for final parsing tests.
 *
 * @author    JM Faure <jmfaure@users.sourceforge.net>
 * @version   1.0
 * @date      09 Aug 2005
 */
final class Final1 {

/**
 * A method with 3 parameters.
 *
 * @param (string) $p1 the first parameter
 * @param (int) $p2 the second parameter
 * @param (string) $p3 the 3rd parameter
 * @return (void)
 */
protected function f3param($p1, int $p2, string $p3) {

  // Print the 3 parameters
  echo $p1 . "\n";
  echo $p2 . "\n";
  echo $p3 . "\n";

  return true;
}

/**
 * A method with parameters passed by reference.
 *
 * The function statement presents the & reference char in
 * different places (& $p1 and &$p2).
 *
 * @warning  unstable
 * @param (string) $p1 the 1st parameter
 * @param (bool) $p2 the 2nd parameter
 *                   has a two-line comment
 * @return (string) the function result
 */
function fpbyref(& $p1, bool &$p2) {

  return $p1;
}

/**
 * A method with a lot @info items.
 *
 * The function statement presents default values and casting.
 *
 * @param (int) $p1 the first parameter
 * @param (mixed) $p2 a text (string) as regular entry
 *                    or false (bool) to get a particualr behavior
 * @param (string) $p3 the third parameter
 *                  is commented onto
 *                  three lines
 * @param (array) $p4 a structured list:
 *                    'name' => the user name
 *                    'address' => the user address
 *                    'city' => the city name
 * @return (void) if echo flag $p1 is true,
 *                the comment continue on a three
 *                lines to test return values parsing
 *         (string) the printable result if echo flag is false (default)
 */
private function mlotinf($p1, $p2="a string", string $p3 = "another string", $p4) {

  if ($p1) {
    return;
  } else {
    return "whatever";
  }
}
}
?>
